import request from '@/utils/request'
export const getManageList = (params) => {
  return request.get('/user-manage/list', { params, type: 'get' })
}
export const upLoadManage = (data) => {
  return request({
    url: '/user-manage/batch/import',
    method: 'post',
    data
  })
}
// 删除用户
export const delUserManage = (id) => {
  return request({
    url: '/user-manage/detele/' + id,
    method: 'get'
  })
}

// 获取所有用户
export const getUserAll = () => {
  return request({
    url: '/user-manage/all-list',
    method: 'get'
  })
}
// 获取用户信息
export const getUserInfo = (id) => {
  return request({
    url: `/user-manage/detail/${id}`,
    method: 'get'
  })
}
export const getUseRole = (id) => {
  return request({
    url: `/user-manage/role/${id}`,
    method: 'get'
  })
}
// 为用户分配角色
export const updatRole = (id, roles) => {
  return request({
    url: `/user-manage/update-role/${id}`,
    method: 'post',
    data: {
      roles
    }
  })
}
